/*
 * PlaylistInsertAction.java
 *
 * Created on April 8, 2006, 1:28 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package com.bff.slimserver.musicjukebox.lib.actions;

import com.bff.slimserver.musicjukebox.ui.AlbumThumbnailDialog;
import com.bff.bjj.utils.Resources;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JFrame;
import org.bff.slimserver.musicobjects.SlimAlbum;

/**
 *
 * @author Bill
 */
public class ViewAlbumAction extends AbstractAction {

    private SlimAlbum album;
    private JFrame parent;

    /** Creates a new instance of PlaylistInsertAction */
    public ViewAlbumAction(JFrame parent, SlimAlbum album) {
        this.album = album;
        this.parent = parent;
        putValue(Action.NAME,
                Resources.getMessage(Resources.LABEL_KEY.ACTION_VIEW_ALBUM_NAME));
        putValue(Action.SHORT_DESCRIPTION,
                Resources.getMessage(Resources.LABEL_KEY.ACTION_VIEW_ALBUM_SHORT_DESC));
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        new AlbumThumbnailDialog(parent, album).setVisible(true);
    }

    public void setAlbum(SlimAlbum album) {
        this.album = album;
    }
}
